package com.shd;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Created by shanhaodong on 2018/8/21
 */
public class DateApi {
    public static void main(String[] args) {
        LocalDateTime dateTime = LocalDateTime.now();
        LocalDateTime dateTime1 = dateTime.plusMinutes(10);
        System.out.println(dateTime);
        System.out.println(dateTime1);
        String format = dateTime1.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
        System.out.println(format);
    }
}
